package com.gexiaobao.pigeon.app.model.bean

import android.os.Parcelable
import kotlinx.android.parcel.Parcelize

/**
 * @Author      : hxw
 * @Date        : 2023/7/10 15:56
 * @Describe    :
 */
@Parcelize
class LogisticsProgressResponse(

    var total: Int = 0,
    var arrivalTime: String = "",
    var com: String = "",
    var condition: String = "",
    var data: ArrayList<ListData> = arrayListOf(),
    var isLoop: Boolean = false,
    var ischeck: String = "",
    var message: String = "",
    var nu: String = "",
    var remainTime: String = "",
    var routeInfo: RouteInfo? = null,
    var state: String = "",
    var status: String = "",
    var totalTime: String = "",
    var trailUrl: String = "",//地图

) : Parcelable {

    @Parcelize
    class RouteInfo(
        var cur: Cur? = null,
        var from: From? = null,
        var to: To? = null,

        ) : Parcelable {

        @Parcelize
        class Cur(
            var name: String = "",
            var number: String = "",
        ) : Parcelable

        @Parcelize
        class From(
            var name: String = "",
            var number: String = "",
        ) : Parcelable

        @Parcelize
        class To(
            var name: String = "",
            var number: String = "",
        ) : Parcelable

    }

    /**
     * 数据是否为空
     */
    fun isEmpty() = data == null || (data as List<*>).isEmpty()

    @Parcelize
    class ListData(
        var areaCode: String = "",//"CN370212000000"
        var areaName: String = "",// "山东,青岛市,崂山区",
        var context: String = "",//"已签收，签收人凭取货码签收。如有疑问请联系: 18521845698，投诉电话: 053255786516,053255786617。感谢使用圆通速递，期待再次为您服务！如果您对我们的服务感到满意，请在[评价快递员]处赐予我们五星好评~",
        var ftime: String = "",//"2023-07-03 18:48:36",
        var status: String = "",//"签收",
        var time: String = "",//"2023-07-03 18:48:36"

    ) : Parcelable

}